import httpInstance from "@/utils/http.js";

export function getDishes(params) {
    console.log(params)
    //https://dongdong.cloud/user/dish/list?categoryId=19
    return httpInstance({
        url: '/user/dish/list',
        method: 'GET',
        params,
    });
}


// 获取菜品规格
export const getMoreNorm = (params) =>
    httpInstance({
        url: `/user/dish/flavor/${params.dishId}`,
        method: 'GET',
        params,
    })

// 获取菜品分类列表
export const getList = (params) =>
    httpInstance({
        url: `/user/dish/category`,
        method: 'GET',
        params,
    })

// 获取菜品详情
export const getDishDetail = (params) =>
    httpInstance({
        url: `/user/dish/setmealDishList/${params.setmealId}`,
        method: 'GET',
        params,
    })

// 根据分类获取菜品列表
export const getDishList = (params) =>
    httpInstance({
        url: `/user/dish/dishPageList/${params.categoryId}/${params.type}/${params.page}/${params.pageSize}`,
        method: 'GET',
        params
    })